﻿<Window x:Class="Renci.Wwt.DataManager.Views.AnalyzeDataView"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             xmlns:extToolkit="clr-namespace:Microsoft.Windows.Controls;assembly=WPFToolkit.Extended"
             xmlns:i="clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity" 
             mc:Ignorable="d" 
		     xmlns:Service="clr-namespace:Renci.Wwt.DataManager.Services"
		     Service:DialogService.IsRegisteredView="True"
             ShowInTaskbar="False"
             WindowStartupLocation="CenterOwner"
             Title="Data Analysis Wizard" 
             Height="300" Width="500"
             d:DesignHeight="400" d:DesignWidth="600">
    <extToolkit:Wizard x:Name="Wizard"  FinishButtonClosesWindow="True" >
        <i:Interaction.Triggers>
            <i:EventTrigger EventName="Finish">
                <i:InvokeCommandAction x:Name="Finish" Command="{Binding Path=FinishWizardCommand, Mode=OneWay}"  />
            </i:EventTrigger>
        </i:Interaction.Triggers>
        <extToolkit:WizardPage x:Name="IntroPage" 
                                Title="Welcome to World Wide Telescope Data Analysis Wizard"
                                Description="This Wizard will analyze data and determine whether data can be published into World Wide Telescope." 
                                NextCommand="{Binding SummaryCommand}" />
        <extToolkit:WizardPage x:Name="SummaryPage" 
                                PageType="Interior"
                                Title="Data summary"
                                Description="The following data and attached filters will be analyzed."
                                NextCommand="{Binding AnalyzeCommand}"
                                NextPage="{Binding ElementName=AnalizyPage}"
                                PreviousPage="{Binding ElementName=IntroPage}">
            <ListBox ItemsSource="{Binding ProgressLog}">
                <ListBox.ItemTemplate>
                    <DataTemplate>
                        <TextBlock Text="{Binding}" />
                    </DataTemplate>
                </ListBox.ItemTemplate>
            </ListBox>
        </extToolkit:WizardPage>
        <extToolkit:WizardPage x:Name="AnalizyPage" 
                                PageType="Interior"
                                Title="Data Analysis"
                                CanSelectNextPage="{Binding IsAnalizesFinished}"
                                CanSelectPreviousPage="{Binding IsAnalizesFinished}"
                                Description="Analyzing data.">
            <ListBox ItemsSource="{Binding ProgressLog}">
                <ListBox.ItemTemplate>
                    <DataTemplate>
                        <TextBlock Text="{Binding}" />
                    </DataTemplate>
                </ListBox.ItemTemplate>
            </ListBox>
        </extToolkit:WizardPage>
        <extToolkit:WizardPage x:Name="LastPage" 
                                PageType="Interior"
                                Title="Analysis Result"
                                Description="Data has been analyzed with the following result."                               
                                CanFinish="True">
            <TextBlock Padding="20" HorizontalAlignment="Center" VerticalAlignment="Center" FontSize="26" FontWeight="Bold" Foreground="{Binding AlertColor}" Text="{Binding AlertText}"/>
        </extToolkit:WizardPage>
    </extToolkit:Wizard>
</Window>
